home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / SourceCode / AdobeExamples / NX_HitDetect / DrawingViewWraps.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-19  |  25.9 KB  |  723 lines

  1. /* DrawingViewWraps.c generated from DrawingViewWraps.psw
  2.    by unix pswrap V1.009  Wed Apr 19 17:50:24 PDT 1989
  3.  */
  4.  
  5. #include <dpsclient/dpsfriends.h>
  6. #include <string.h>
  7.  
  8. #line 1 "DrawingViewWraps.psw"
  9.  
  10. /*
  11.  * (a)  (C) 1990 by Adobe Systems Incorporated. All rights reserved.
  12.  *
  13.  * (b)  If this Sample Code is distributed as part of the Display PostScript
  14.  *    System Software Development Kit from Adobe Systems Incorporated,
  15.  *    then this copy is designated as Development Software and its use is
  16.  *    subject to the terms of the License Agreement attached to such Kit.
  17.  *
  18.  * (c)  If this Sample Code is distributed independently, then the following
  19.  *    terms apply:
  20.  *
  21.  * (d)  This file may be freely copied and redistributed as long as:
  22.  *    1) Parts (a), (d), (e) and (f) continue to be included in the file,
  23.  *    2) If the file has been modified in any way, a notice of such
  24.  *      modification is conspicuously indicated.
  25.  *
  26.  * (e)  PostScript, Display PostScript, and Adobe are registered trademarks of
  27.  *    Adobe Systems Incorporated.
  28.  * 
  29.  * (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
  30.  *    CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
  31.  *    AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
  32.  *    ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
  33.  *    OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
  34.  *    WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
  35.  *    WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
  36.  *    DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, 
  37.  *    FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
  38.  *    OF THIRD PARTY RIGHTS.
  39.  */
  40.  
  41. /*
  42. *    DetectViewWraps.psw
  43. *
  44. *    The wraps used to check for hit detection, draw the control points
  45. *    and lines and create the control points font.
  46. */
  47. #line 48 "DrawingViewWraps.c"
  48. void PSWSetUpath(float Pts[], int Tot_Pts, char Ops[], int Tot_Ops)
  49. {
  50.   typedef struct {
  51.     unsigned char tokenType;
  52.     unsigned char topLevelCount;
  53.     unsigned short nBytes;
  54.  
  55.     DPSBinObjGeneric obj0;
  56.     DPSBinObjGeneric obj1;
  57.     DPSBinObjGeneric obj2;
  58.     } _dpsQ;
  59.   static const _dpsQ _dpsStat = {
  60.     DPS_DEF_TOKENTYPE, 1, 28,
  61.     {DPS_LITERAL|DPS_ARRAY, 0, 2, 8},
  62.     {DPS_LITERAL|DPS_STRING, 0, 0, 24},    /* param[var]: Pts */
  63.     {DPS_LITERAL|DPS_STRING, 0, 0, 24},    /* param Ops */
  64.     }; /* _dpsQ */
  65.   unsigned char HNumHeader[4];
  66.   _dpsQ _dpsF;    /* local copy  */
  67.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  68.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  69.   register int _dps_offset = 24;
  70.   _dpsF = _dpsStat;    /* assign automatic variable */
  71.  
  72.   _dpsP[1].length = (Tot_Pts * sizeof(float)) + 4;
  73.   _dpsP[2].length = Tot_Ops;
  74.   _dpsP[2].val.stringVal = _dps_offset;
  75.   _dps_offset += (Tot_Ops + 3) & ~3;
  76.   _dpsP[1].val.stringVal = _dps_offset;
  77.   _dps_offset += (Tot_Pts * sizeof(float)) + 4;
  78.  
  79.   _dpsF.nBytes = _dps_offset+4;
  80.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,28);
  81.   DPSWriteStringChars(_dpsCurCtxt, (char *)Ops, Tot_Ops);
  82.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(Tot_Ops + 3) & 3);
  83.   HNumHeader[0] = 149;
  84.   HNumHeader[1] = 48 + ((DPS_DEF_TOKENTYPE % 2) * 128)
  85.                 + ((DPS_DEF_TOKENTYPE >= 130) ? 1 : 0);
  86.   HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 2 : 3] = (unsigned char) Tot_Pts;
  87.   HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 3 : 2] = (unsigned char) (Tot_Pts >> 8);
  88.   DPSWriteStringChars(_dpsCurCtxt, (char *)HNumHeader, 4);
  89.   DPSWriteStringChars(_dpsCurCtxt, (char *)Pts, Tot_Pts * sizeof(float));
  90. }
  91. #line 43 "DrawingViewWraps.psw"
  92.  
  93. #line 94 "DrawingViewWraps.c"
  94. void PSWUpathStroke(int UPath)
  95. {
  96.   typedef struct {
  97.     unsigned char tokenType;
  98.     unsigned char topLevelCount;
  99.     unsigned short nBytes;
  100.  
  101.     DPSBinObjGeneric obj0;
  102.     DPSBinObjGeneric obj1;
  103.     DPSBinObjGeneric obj2;
  104.     } _dpsQ;
  105.   static const _dpsQ _dpsStat = {
  106.     DPS_DEF_TOKENTYPE, 3, 28,
  107.     {DPS_LITERAL|DPS_INT, 0, 0, 0},    /* param: UPath */
  108.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 212},    /* execuserobject */
  109.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 183},    /* ustroke */
  110.     }; /* _dpsQ */
  111.   _dpsQ _dpsF;    /* local copy  */
  112.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  113.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  114.   _dpsF = _dpsStat;    /* assign automatic variable */
  115.  
  116.   _dpsP[0].val.integerVal = UPath;
  117.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,28);
  118. }
  119. #line 47 "DrawingViewWraps.psw"
  120.  
  121.  
  122. /*
  123.  *  The return value, Hit, is the result of the inustroke
  124.  *  operation, either true or false.
  125.  */
  126. #line 127 "DrawingViewWraps.c"
  127. void PSWHitPath(float HPts[], int Tot_HPts, char HOps[], int Tot_HOps, float Pts[], int Tot_Pts, char Ops[], int Tot_Ops, int *Hit)
  128. {
  129.   typedef struct {
  130.     unsigned char tokenType;
  131.     unsigned char topLevelCount;
  132.     unsigned short nBytes;
  133.  
  134.     DPSBinObjGeneric obj0;
  135.     DPSBinObjGeneric obj1;
  136.     DPSBinObjGeneric obj2;
  137.     DPSBinObjGeneric obj3;
  138.     DPSBinObjGeneric obj4;
  139.     DPSBinObjGeneric obj5;
  140.     DPSBinObjGeneric obj6;
  141.     DPSBinObjGeneric obj7;
  142.     DPSBinObjGeneric obj8;
  143.     DPSBinObjGeneric obj9;
  144.     DPSBinObjGeneric obj10;
  145.     DPSBinObjGeneric obj11;
  146.     DPSBinObjGeneric obj12;
  147.     } _dpsQ;
  148.   static const _dpsQ _dpsStat = {
  149.     DPS_DEF_TOKENTYPE, 9, 108,
  150.     {DPS_LITERAL|DPS_ARRAY, 0, 2, 88},
  151.     {DPS_LITERAL|DPS_ARRAY, 0, 2, 72},
  152.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 312},    /* inustroke */
  153.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  154.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  155.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  156.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  157.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  158.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 70},    /* flush */
  159.     {DPS_LITERAL|DPS_STRING, 0, 0, 104},    /* param[var]: Pts */
  160.     {DPS_LITERAL|DPS_STRING, 0, 0, 104},    /* param Ops */
  161.     {DPS_LITERAL|DPS_STRING, 0, 0, 104},    /* param[var]: HPts */
  162.     {DPS_LITERAL|DPS_STRING, 0, 0, 104},    /* param HOps */
  163.     }; /* _dpsQ */
  164.   unsigned char HNumHeader[4];
  165.   _dpsQ _dpsF;    /* local copy  */
  166.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  167.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  168.   register int _dps_offset = 104;
  169.   DPSResultsRec _dpsR[1];
  170.   static const DPSResultsRec _dpsRstat[] = {
  171.     { dps_tBoolean, -1 },
  172.     };
  173.     _dpsR[0] = _dpsRstat[0];
  174.     _dpsR[0].value = (char *)Hit;
  175.  
  176.   _dpsF = _dpsStat;    /* assign automatic variable */
  177.  
  178.   _dpsP[11].length = (Tot_HPts * sizeof(float)) + 4;
  179.   _dpsP[12].length = Tot_HOps;
  180.   _dpsP[9].length = (Tot_Pts * sizeof(float)) + 4;
  181.   _dpsP[10].length = Tot_Ops;
  182.   _dpsP[12].val.stringVal = _dps_offset;
  183.   _dps_offset += (Tot_HOps + 3) & ~3;
  184.   _dpsP[11].val.stringVal = _dps_offset;
  185.   _dps_offset += (Tot_HPts * sizeof(float)) + 4;
  186.   _dpsP[10].val.stringVal = _dps_offset;
  187.   _dps_offset += (Tot_Ops + 3) & ~3;
  188.   _dpsP[9].val.stringVal = _dps_offset;
  189.   _dps_offset += (Tot_Pts * sizeof(float)) + 4;
  190.  
  191.   _dpsF.nBytes = _dps_offset+4;
  192.   DPSSetResultTable(_dpsCurCtxt, _dpsR, 1);
  193.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,108);
  194.   DPSWriteStringChars(_dpsCurCtxt, (char *)HOps, Tot_HOps);
  195.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(Tot_HOps + 3) & 3);
  196.   HNumHeader[0] = 149;
  197.   HNumHeader[1] = 48 + ((DPS_DEF_TOKENTYPE % 2) * 128)
  198.                 + ((DPS_DEF_TOKENTYPE >= 130) ? 1 : 0);
  199.   HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 2 : 3] = (unsigned char) Tot_HPts;
  200.   HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 3 : 2] = (unsigned char) (Tot_HPts >> 8);
  201.   DPSWriteStringChars(_dpsCurCtxt, (char *)HNumHeader, 4);
  202.   DPSWriteStringChars(_dpsCurCtxt, (char *)HPts, Tot_HPts * sizeof(float));
  203.   DPSWriteStringChars(_dpsCurCtxt, (char *)Ops, Tot_Ops);
  204.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(Tot_Ops + 3) & 3);
  205.   HNumHeader[0] = 149;
  206.   HNumHeader[1] = 48 + ((DPS_DEF_TOKENTYPE % 2) * 128)
  207.                 + ((DPS_DEF_TOKENTYPE >= 130) ? 1 : 0);
  208.   HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 2 : 3] = (unsigned char) Tot_Pts;
  209.   HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 3 : 2] = (unsigned char) (Tot_Pts >> 8);
  210.   DPSWriteStringChars(_dpsCurCtxt, (char *)HNumHeader, 4);
  211.   DPSWriteStringChars(_dpsCurCtxt, (char *)Pts, Tot_Pts * sizeof(float));
  212.   DPSAwaitReturnValues(_dpsCurCtxt);
  213. }
  214. #line 57 "DrawingViewWraps.psw"
  215.  
  216. #line 217 "DrawingViewWraps.c"
  217. void PSWDrawControlPoints(float X, float Y, float Pts[], int Tot_Pts, char *Chs)
  218. {
  219.   typedef struct {
  220.     unsigned char tokenType;
  221.     unsigned char sizeFlag;
  222.     unsigned short topLevelCount;
  223.     unsigned long nBytes;
  224.  
  225.     DPSBinObjReal obj0;
  226.     DPSBinObjReal obj1;
  227.     DPSBinObjGeneric obj2;
  228.     DPSBinObjGeneric obj3;
  229.     DPSBinObjGeneric obj4;
  230.     DPSBinObjGeneric obj5;
  231.     } _dpsQ;
  232.   static const _dpsQ _dpsStat = {
  233.     DPS_DEF_TOKENTYPE, 0, 6, 56,
  234.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X */
  235.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y */
  236.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  237.     {DPS_LITERAL|DPS_STRING, 0, 0, 48},    /* param Chs */
  238.     {DPS_LITERAL|DPS_STRING, 0, 0, 48},    /* param[var]: Pts */
  239.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 195},    /* xyshow */
  240.     }; /* _dpsQ */
  241.   unsigned char HNumHeader[4];
  242.   _dpsQ _dpsF;    /* local copy  */
  243.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  244.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  245.   register int _dps_offset = 48;
  246.   _dpsF = _dpsStat;    /* assign automatic variable */
  247.  
  248.   _dpsP[0].val.realVal = X;
  249.   _dpsP[1].val.realVal = Y;
  250.   _dpsP[4].length = (Tot_Pts * sizeof(float)) + 4;
  251.   _dpsP[3].length = strlen(Chs);
  252.   _dpsP[4].val.stringVal = _dps_offset;
  253.   _dps_offset += (Tot_Pts * sizeof(float)) + 4;
  254.   _dpsP[3].val.stringVal = _dps_offset;
  255.   _dps_offset += (_dpsP[3].length + 3) & ~3;
  256.  
  257.   _dpsF.nBytes = _dps_offset+8;
  258.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,56);
  259.   HNumHeader[0] = 149;
  260.   HNumHeader[1] = 48 + ((DPS_DEF_TOKENTYPE % 2) * 128)
  261.                 + ((DPS_DEF_TOKENTYPE >= 130) ? 1 : 0);
  262.   HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 2 : 3] = (unsigned char) Tot_Pts;
  263.   HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 3 : 2] = (unsigned char) (Tot_Pts >> 8);
  264.   DPSWriteStringChars(_dpsCurCtxt, (char *)HNumHeader, 4);
  265.   DPSWriteStringChars(_dpsCurCtxt, (char *)Pts, Tot_Pts * sizeof(float));
  266.   DPSWriteStringChars(_dpsCurCtxt, (char *)Chs, _dpsP[3].length);
  267.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[3].length + 3) & 3);
  268. }
  269. #line 61 "DrawingViewWraps.psw"
  270.  
  271.  
  272. /*
  273. *  The sa and rsa procedures ensure that the first character is drawn correctly
  274. *  with respect to device space. It's not so much an issue with square 
  275. *  images but can be quite significant with other shapes.
  276. */
  277. #line 278 "DrawingViewWraps.c"
  278. void PSWDefineFont(char *fontname)
  279. {
  280.   typedef struct {
  281.     unsigned char tokenType;
  282.     unsigned char sizeFlag;
  283.     unsigned short topLevelCount;
  284.     unsigned long nBytes;
  285.  
  286.     DPSBinObjGeneric obj0;
  287.     DPSBinObjGeneric obj1;
  288.     DPSBinObjGeneric obj2;
  289.     DPSBinObjGeneric obj3;
  290.     DPSBinObjGeneric obj4;
  291.     DPSBinObjGeneric obj5;
  292.     DPSBinObjGeneric obj6;
  293.     DPSBinObjGeneric obj7;
  294.     DPSBinObjGeneric obj8;
  295.     DPSBinObjGeneric obj9;
  296.     DPSBinObjGeneric obj10;
  297.     DPSBinObjGeneric obj11;
  298.     DPSBinObjGeneric obj12;
  299.     DPSBinObjGeneric obj13;
  300.     DPSBinObjGeneric obj14;
  301.     DPSBinObjGeneric obj15;
  302.     DPSBinObjGeneric obj16;
  303.     DPSBinObjGeneric obj17;
  304.     DPSBinObjGeneric obj18;
  305.     DPSBinObjGeneric obj19;
  306.     DPSBinObjGeneric obj20;
  307.     DPSBinObjGeneric obj21;
  308.     DPSBinObjGeneric obj22;
  309.     DPSBinObjGeneric obj23;
  310.     DPSBinObjGeneric obj24;
  311.     DPSBinObjGeneric obj25;
  312.     DPSBinObjGeneric obj26;
  313.     DPSBinObjGeneric obj27;
  314.     DPSBinObjGeneric obj28;
  315.     DPSBinObjGeneric obj29;
  316.     DPSBinObjGeneric obj30;
  317.     DPSBinObjGeneric obj31;
  318.     DPSBinObjGeneric obj32;
  319.     DPSBinObjGeneric obj33;
  320.     DPSBinObjGeneric obj34;
  321.     DPSBinObjGeneric obj35;
  322.     DPSBinObjGeneric obj36;
  323.     DPSBinObjGeneric obj37;
  324.     DPSBinObjGeneric obj38;
  325.     DPSBinObjGeneric obj39;
  326.     DPSBinObjGeneric obj40;
  327.     DPSBinObjGeneric obj41;
  328.     DPSBinObjGeneric obj42;
  329.     DPSBinObjGeneric obj43;
  330.     DPSBinObjGeneric obj44;
  331.     DPSBinObjGeneric obj45;
  332.     DPSBinObjGeneric obj46;
  333.     DPSBinObjGeneric obj47;
  334.     DPSBinObjGeneric obj48;
  335.     DPSBinObjGeneric obj49;
  336.     DPSBinObjGeneric obj50;
  337.     DPSBinObjGeneric obj51;
  338.     DPSBinObjGeneric obj52;
  339.     DPSBinObjGeneric obj53;
  340.     DPSBinObjGeneric obj54;
  341.     DPSBinObjGeneric obj55;
  342.     DPSBinObjGeneric obj56;
  343.     DPSBinObjGeneric obj57;
  344.     DPSBinObjGeneric obj58;
  345.     DPSBinObjGeneric obj59;
  346.     DPSBinObjGeneric obj60;
  347.     DPSBinObjGeneric obj61;
  348.     DPSBinObjGeneric obj62;
  349.     DPSBinObjGeneric obj63;
  350.     DPSBinObjGeneric obj64;
  351.     DPSBinObjGeneric obj65;
  352.     DPSBinObjGeneric obj66;
  353.     DPSBinObjGeneric obj67;
  354.     DPSBinObjGeneric obj68;
  355.     DPSBinObjGeneric obj69;
  356.     DPSBinObjGeneric obj70;
  357.     DPSBinObjGeneric obj71;
  358.     DPSBinObjGeneric obj72;
  359.     DPSBinObjGeneric obj73;
  360.     DPSBinObjGeneric obj74;
  361.     DPSBinObjGeneric obj75;
  362.     DPSBinObjGeneric obj76;
  363.     DPSBinObjGeneric obj77;
  364.     DPSBinObjGeneric obj78;
  365.     DPSBinObjGeneric obj79;
  366.     DPSBinObjGeneric obj80;
  367.     DPSBinObjGeneric obj81;
  368.     DPSBinObjGeneric obj82;
  369.     DPSBinObjGeneric obj83;
  370.     DPSBinObjGeneric obj84;
  371.     DPSBinObjGeneric obj85;
  372.     DPSBinObjGeneric obj86;
  373.     DPSBinObjGeneric obj87;
  374.     DPSBinObjGeneric obj88;
  375.     DPSBinObjGeneric obj89;
  376.     DPSBinObjGeneric obj90;
  377.     DPSBinObjGeneric obj91;
  378.     DPSBinObjGeneric obj92;
  379.     DPSBinObjGeneric obj93;
  380.     DPSBinObjGeneric obj94;
  381.     DPSBinObjGeneric obj95;
  382.     DPSBinObjGeneric obj96;
  383.     DPSBinObjGeneric obj97;
  384.     DPSBinObjGeneric obj98;
  385.     DPSBinObjGeneric obj99;
  386.     DPSBinObjGeneric obj100;
  387.     DPSBinObjGeneric obj101;
  388.     DPSBinObjGeneric obj102;
  389.     DPSBinObjGeneric obj103;
  390.     DPSBinObjGeneric obj104;
  391.     DPSBinObjGeneric obj105;
  392.     DPSBinObjGeneric obj106;
  393.     DPSBinObjGeneric obj107;
  394.     DPSBinObjGeneric obj108;
  395.     DPSBinObjGeneric obj109;
  396.     DPSBinObjGeneric obj110;
  397.     DPSBinObjGeneric obj111;
  398.     DPSBinObjGeneric obj112;
  399.     DPSBinObjGeneric obj113;
  400.     DPSBinObjGeneric obj114;
  401.     DPSBinObjGeneric obj115;
  402.     DPSBinObjGeneric obj116;
  403.     DPSBinObjGeneric obj117;
  404.     DPSBinObjGeneric obj118;
  405.     DPSBinObjGeneric obj119;
  406.     DPSBinObjGeneric obj120;
  407.     DPSBinObjGeneric obj121;
  408.     DPSBinObjGeneric obj122;
  409.     DPSBinObjGeneric obj123;
  410.     DPSBinObjGeneric obj124;
  411.     DPSBinObjGeneric obj125;
  412.     DPSBinObjGeneric obj126;
  413.     DPSBinObjGeneric obj127;
  414.     DPSBinObjGeneric obj128;
  415.     DPSBinObjGeneric obj129;
  416.     DPSBinObjReal obj130;
  417.     DPSBinObjGeneric obj131;
  418.     DPSBinObjGeneric obj132;
  419.     DPSBinObjReal obj133;
  420.     DPSBinObjGeneric obj134;
  421.     DPSBinObjGeneric obj135;
  422.     DPSBinObjGeneric obj136;
  423.     DPSBinObjGeneric obj137;
  424.     DPSBinObjGeneric obj138;
  425.     DPSBinObjGeneric obj139;
  426.     DPSBinObjGeneric obj140;
  427.     DPSBinObjGeneric obj141;
  428.     DPSBinObjGeneric obj142;
  429.     DPSBinObjReal obj143;
  430.     DPSBinObjGeneric obj144;
  431.     DPSBinObjGeneric obj145;
  432.     DPSBinObjReal obj146;
  433.     DPSBinObjGeneric obj147;
  434.     DPSBinObjGeneric obj148;
  435.     DPSBinObjReal obj149;
  436.     DPSBinObjGeneric obj150;
  437.     DPSBinObjGeneric obj151;
  438.     DPSBinObjReal obj152;
  439.     DPSBinObjGeneric obj153;
  440.     DPSBinObjGeneric obj154;
  441.     DPSBinObjGeneric obj155;
  442.     char obj156[1];
  443.     char obj157[1];
  444.     } _dpsQ;
  445.   static const _dpsQ _dpsStat = {
  446.     DPS_DEF_TOKENTYPE, 0, 69, 1258,
  447.     {DPS_LITERAL|DPS_INT, 0, 0, 10},
  448.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 53},    /* dict */
  449.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 56},    /* dup */
  450.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 13},    /* begin */
  451.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* sa */
  452.     {DPS_EXEC|DPS_ARRAY, 0, 14, 1136},
  453.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14},    /* bind */
  454.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  455.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* rsa */
  456.     {DPS_EXEC|DPS_ARRAY, 0, 6, 1088},
  457.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14},    /* bind */
  458.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  459.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* FontName */
  460.     {DPS_LITERAL|DPS_NAME, 0, 0, 1250},    /* param fontname */
  461.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  462.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* FontType */
  463.     {DPS_LITERAL|DPS_INT, 0, 0, 3},
  464.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  465.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* FontMatrix */
  466.     {DPS_LITERAL|DPS_ARRAY, 0, 6, 1040},
  467.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  468.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* FontBBox */
  469.     {DPS_LITERAL|DPS_ARRAY, 0, 4, 1008},
  470.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  471.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* Encoding */
  472.     {DPS_LITERAL|DPS_INT, 0, 0, 256},
  473.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 9},    /* array */
  474.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  475.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  476.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  477.     {DPS_LITERAL|DPS_INT, 0, 0, 255},
  478.     {DPS_EXEC|DPS_ARRAY, 0, 4, 976},
  479.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 72},    /* for */
  480.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* Encoding */
  481.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 56},    /* dup */
  482.     {DPS_LITERAL|DPS_STRING, 0, 1, 1249},
  483.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  484.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75},    /* get */
  485.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* Rectfill */
  486.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 120},    /* put */
  487.     {DPS_LITERAL|DPS_STRING, 0, 1, 1248},
  488.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  489.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75},    /* get */
  490.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* Rectopen */
  491.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 120},    /* put */
  492.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* CharProcs */
  493.     {DPS_LITERAL|DPS_INT, 0, 0, 3},
  494.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 53},    /* dict */
  495.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  496.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* CharProcs */
  497.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 13},    /* begin */
  498.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* .notdef */
  499.     {DPS_EXEC|DPS_ARRAY, 0, 0, 976},
  500.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  501.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* Rectfill */
  502.     {DPS_EXEC|DPS_ARRAY, 0, 18, 832},
  503.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  504.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* Rectopen */
  505.     {DPS_EXEC|DPS_ARRAY, 0, 18, 688},
  506.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  507.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 57},    /* end */
  508.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* BuildChar */
  509.     {DPS_EXEC|DPS_ARRAY, 0, 17, 552},
  510.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  511.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 57},    /* end */
  512.     {DPS_LITERAL|DPS_NAME, 0, 0, 1250},    /* param fontname */
  513.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62},    /* exch */
  514.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 290},    /* definefont */
  515.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 117},    /* pop */
  516.     {DPS_LITERAL|DPS_INT, 0, 0, 500},
  517.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  518.     {DPS_LITERAL|DPS_INT, 0, 0, -500},
  519.     {DPS_LITERAL|DPS_INT, 0, 0, -500},
  520.     {DPS_LITERAL|DPS_INT, 0, 0, 500},
  521.     {DPS_LITERAL|DPS_INT, 0, 0, 500},
  522.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 144},    /* setcachedevice */
  523.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62},    /* exch */
  524.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 13},    /* begin */
  525.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* Encoding */
  526.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62},    /* exch */
  527.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75},    /* get */
  528.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* CharProcs */
  529.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62},    /* exch */
  530.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75},    /* get */
  531.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 63},    /* exec */
  532.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 57},    /* end */
  533.     {DPS_LITERAL|DPS_INT, 0, 0, -300},
  534.     {DPS_LITERAL|DPS_INT, 0, 0, -300},
  535.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* sa */
  536.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  537.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  538.     {DPS_LITERAL|DPS_INT, 0, 0, 600},
  539.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* rsa */
  540.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 133},    /* rlineto */
  541.     {DPS_LITERAL|DPS_INT, 0, 0, 600},
  542.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  543.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* rsa */
  544.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 133},    /* rlineto */
  545.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  546.     {DPS_LITERAL|DPS_INT, 0, 0, -600},
  547.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* rsa */
  548.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 133},    /* rlineto */
  549.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 22},    /* closepath */
  550.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167},    /* stroke */
  551.     {DPS_LITERAL|DPS_INT, 0, 0, -300},
  552.     {DPS_LITERAL|DPS_INT, 0, 0, -300},
  553.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* sa */
  554.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  555.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  556.     {DPS_LITERAL|DPS_INT, 0, 0, 600},
  557.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* rsa */
  558.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 133},    /* rlineto */
  559.     {DPS_LITERAL|DPS_INT, 0, 0, 600},
  560.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  561.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* rsa */
  562.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 133},    /* rlineto */
  563.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  564.     {DPS_LITERAL|DPS_INT, 0, 0, -600},
  565.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* rsa */
  566.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 133},    /* rlineto */
  567.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 22},    /* closepath */
  568.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 66},    /* fill */
  569.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* Encoding */
  570.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62},    /* exch */
  571.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* .notdef */
  572.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 120},    /* put */
  573.     {DPS_LITERAL|DPS_INT, 0, 0, -500},
  574.     {DPS_LITERAL|DPS_INT, 0, 0, -500},
  575.     {DPS_LITERAL|DPS_INT, 0, 0, 500},
  576.     {DPS_LITERAL|DPS_INT, 0, 0, 500},
  577.     {DPS_LITERAL|DPS_REAL, 0, 0, .001},
  578.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  579.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  580.     {DPS_LITERAL|DPS_REAL, 0, 0, .001},
  581.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  582.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  583.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 55},    /* dtransform */
  584.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 137},    /* round */
  585.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62},    /* exch */
  586.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 137},    /* round */
  587.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62},    /* exch */
  588.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 83},    /* idtransform */
  589.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 172},    /* transform */
  590.     {DPS_LITERAL|DPS_REAL, 0, 0, 0.25},
  591.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 169},    /* sub */
  592.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 137},    /* round */
  593.     {DPS_LITERAL|DPS_REAL, 0, 0, 0.25},
  594.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 1},    /* add */
  595.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62},    /* exch */
  596.     {DPS_LITERAL|DPS_REAL, 0, 0, 0.25},
  597.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 169},    /* sub */
  598.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 137},    /* round */
  599.     {DPS_LITERAL|DPS_REAL, 0, 0, 0.25},
  600.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 1},    /* add */
  601.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62},    /* exch */
  602.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 95},    /* itransform */
  603.     {'b'},
  604.     {'a'},
  605.     }; /* _dpsQ */
  606.   _dpsQ _dpsF;    /* local copy  */
  607.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  608.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  609.   static long int _dpsCodes[28] = {-1};
  610.   register int _dps_offset = 1250;
  611.   {
  612. if (_dpsCodes[0] < 0) {
  613.     static const char * const _dps_names[] = {
  614.     "sa",
  615.     (char *) 0 ,
  616.     (char *) 0 ,
  617.     "rsa",
  618.     (char *) 0 ,
  619.     (char *) 0 ,
  620.     (char *) 0 ,
  621.     (char *) 0 ,
  622.     (char *) 0 ,
  623.     (char *) 0 ,
  624.     "FontName",
  625.     "FontType",
  626.     "FontMatrix",
  627.     "FontBBox",
  628.     "Encoding",
  629.     (char *) 0 ,
  630.     (char *) 0 ,
  631.     (char *) 0 ,
  632.     "Rectfill",
  633.     (char *) 0 ,
  634.     "Rectopen",
  635.     (char *) 0 ,
  636.     "CharProcs",
  637.     (char *) 0 ,
  638.     (char *) 0 ,
  639.     ".notdef",
  640.     (char *) 0 ,
  641.     "BuildChar"};
  642.     long int *_dps_nameVals[28];
  643.     _dps_nameVals[0] = &_dpsCodes[0];
  644.     _dps_nameVals[1] = &_dpsCodes[1];
  645.     _dps_nameVals[2] = &_dpsCodes[2];
  646.     _dps_nameVals[3] = &_dpsCodes[3];
  647.     _dps_nameVals[4] = &_dpsCodes[4];
  648.     _dps_nameVals[5] = &_dpsCodes[5];
  649.     _dps_nameVals[6] = &_dpsCodes[6];
  650.     _dps_nameVals[7] = &_dpsCodes[7];
  651.     _dps_nameVals[8] = &_dpsCodes[8];
  652.     _dps_nameVals[9] = &_dpsCodes[9];
  653.     _dps_nameVals[10] = &_dpsCodes[10];
  654.     _dps_nameVals[11] = &_dpsCodes[11];
  655.     _dps_nameVals[12] = &_dpsCodes[12];
  656.     _dps_nameVals[13] = &_dpsCodes[13];
  657.     _dps_nameVals[14] = &_dpsCodes[14];
  658.     _dps_nameVals[15] = &_dpsCodes[15];
  659.     _dps_nameVals[16] = &_dpsCodes[16];
  660.     _dps_nameVals[17] = &_dpsCodes[17];
  661.     _dps_nameVals[18] = &_dpsCodes[18];
  662.     _dps_nameVals[19] = &_dpsCodes[19];
  663.     _dps_nameVals[20] = &_dpsCodes[20];
  664.     _dps_nameVals[21] = &_dpsCodes[21];
  665.     _dps_nameVals[22] = &_dpsCodes[22];
  666.     _dps_nameVals[23] = &_dpsCodes[23];
  667.     _dps_nameVals[24] = &_dpsCodes[24];
  668.     _dps_nameVals[25] = &_dpsCodes[25];
  669.     _dps_nameVals[26] = &_dpsCodes[26];
  670.     _dps_nameVals[27] = &_dpsCodes[27];
  671.  
  672.     DPSMapNames(_dpsCurCtxt, 28, _dps_names, _dps_nameVals);
  673.     }
  674.   }
  675.  
  676.   _dpsF = _dpsStat;    /* assign automatic variable */
  677.  
  678.   _dpsP[13].length =
  679.   _dpsP[65].length = strlen(fontname);
  680.   _dpsP[4].val.nameVal = _dpsCodes[0];
  681.   _dpsP[106].val.nameVal = _dpsCodes[1];
  682.   _dpsP[88].val.nameVal = _dpsCodes[2];
  683.   _dpsP[8].val.nameVal = _dpsCodes[3];
  684.   _dpsP[118].val.nameVal = _dpsCodes[4];
  685.   _dpsP[114].val.nameVal = _dpsCodes[5];
  686.   _dpsP[110].val.nameVal = _dpsCodes[6];
  687.   _dpsP[100].val.nameVal = _dpsCodes[7];
  688.   _dpsP[96].val.nameVal = _dpsCodes[8];
  689.   _dpsP[92].val.nameVal = _dpsCodes[9];
  690.   _dpsP[12].val.nameVal = _dpsCodes[10];
  691.   _dpsP[15].val.nameVal = _dpsCodes[11];
  692.   _dpsP[18].val.nameVal = _dpsCodes[12];
  693.   _dpsP[21].val.nameVal = _dpsCodes[13];
  694.   _dpsP[24].val.nameVal = _dpsCodes[14];
  695.   _dpsP[122].val.nameVal = _dpsCodes[15];
  696.   _dpsP[78].val.nameVal = _dpsCodes[16];
  697.   _dpsP[33].val.nameVal = _dpsCodes[17];
  698.   _dpsP[38].val.nameVal = _dpsCodes[18];
  699.   _dpsP[54].val.nameVal = _dpsCodes[19];
  700.   _dpsP[43].val.nameVal = _dpsCodes[20];
  701.   _dpsP[57].val.nameVal = _dpsCodes[21];
  702.   _dpsP[45].val.nameVal = _dpsCodes[22];
  703.   _dpsP[81].val.nameVal = _dpsCodes[23];
  704.   _dpsP[49].val.nameVal = _dpsCodes[24];
  705.   _dpsP[51].val.nameVal = _dpsCodes[25];
  706.   _dpsP[124].val.nameVal = _dpsCodes[26];
  707.   _dpsP[61].val.nameVal = _dpsCodes[27];
  708.   _dpsP[65].val.stringVal = _dps_offset;
  709.   _dps_offset += (_dpsP[65].length + 3) & ~3;
  710.   _dpsP[13].val.stringVal = _dps_offset;
  711.   _dps_offset += (_dpsP[13].length + 3) & ~3;
  712.  
  713.   _dpsF.nBytes = _dps_offset+8;
  714.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,1258);
  715.   DPSWriteStringChars(_dpsCurCtxt, (char *)fontname, _dpsP[65].length);
  716.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[65].length + 3) & 3);
  717.   DPSWriteStringChars(_dpsCurCtxt, (char *)fontname, _dpsP[13].length);
  718.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[13].length + 3) & 3);
  719. }
  720. #line 125 "DrawingViewWraps.psw"
  721.  
  722.  
  723.